package com.xuan.error;

import static jdk.nashorn.internal.objects.NativeRegExp.test;

public class test0 {
//        先写一个可能会存在异常的方法

static void test0(int a) throws myexception {
    System.out.println("传递的参数"+a);
    if (a>10) {
        throw new myexception(a);//可选择抛出或捕获
    }
    System.out.println("ok");
}


public static void main(String[] args) {
    try {
        test0 (81);
    } catch (myexception e) {

        System.out.println("myexception =>"+e);
    }
}}